import request from '@/utils/request'

/** *
 * 获取权限列表
 * **/
export function getPermissionList() {
  return request({
    url: '/sys/permission'
  })
}

/** *
 * 新增权限列表
 * **/
export function addPermissionList(data) {
  return request({
    url: '/sys/permission',
    method: 'post',
    data
  })
}
/** *
 * 获取权限点详情
 * **/
export function detailsPermissionList(id) {
  return request({
    url: `/sys/permission/${id}`
  })
}

/** *
 * 编辑-权限点详情
 * **/
export function editPermissionList(data) {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}

/** *
 * 删除权限点
 * **/
export function delPermissionList(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'DELETE'
  })
}
